{% extends "master.html" %}
{% block subtitle %} - 找回密码{% endblock %}

{% block header %}
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container">
                <a class="btn navbar-btn" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="glyphicon glyphicon-bar"></span>
                    <span class="glyphicon glyphicon-bar"></span>
                    <span class="glyphicon glyphicon-bar"></span>
                </a>
                <a class="navbar-brand" href="{{url_for('bpRoot.view')}}"><strong>雅菡珠宝</strong></a>
                <!--/.navbar-collapse -->
            </div>
        </div>
    </div>
{% endblock %}

{% block main %}
<div class="container">
    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <form class="form-horizontal" action="{{url_for('bpAuth.forget_password', t=t)}}" method="post">
                {{ form.csrf_token }}
                <fieldset>
                    {% if request.args.t == 'input_email' %}
                        <legend>找回密码</legend>
                        {{ mymacros.render_field_with_errors(form.email) }}
                    {% elif request.args.t == 'reset_password' %}
                        <legend>重置密码</legend>
                        {{ form.forget_pw_sha1()|safe }}
                        {{ mymacros.render_field_with_errors(form.password) }}
                        {{ mymacros.render_field_with_errors(form.password_confirm) }}
                    {% endif %}
                    <div class="btn-toolbar pull-right">
                        <div class="btn-group"><button class="btn btn-default" onclick="return toCancel()">取消</button></div>
                        <div class="btn-group"><button class="btn btn-primary" onclick="return toSubmit()">确认</button></div>
                    </div>
                </fieldset>
          </form>
      </div>
    </div>
</div>
{% endblock %}
